using System;
using LambdaGp.Core;

namespace LambdaGp.Operators.Functions.MathFunctions
{
    public class Min : BinaryFunction
    {
        public Min()
            : base("min")
        {
        }

        protected override Func<double> CompileBinaryToFunc(Individual individual, Func<double> first, Func<double> second)
        {
            return () => Math.Min(first(), second());
        }
    }
}
